#@base("教师监考")

#define content()
    <div style="background-color: rgba(255,255,255,1)">
        <div class="page-header">
            <h3>#(teacher)
                <small>&nbsp;&nbsp;#(semester ?? )考试安排 还有 #(count ??) 科考试</small>
            </h3>
        </div>

        <table class="table">
            #for (exam : testList)
                <tr class="exam-#(exam.color)">
                    <td>
                        <div class="exam-head" id="#(exam.timestamp)">
                            <strong>时间:#(exam.time)</strong>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="exam-body font-color-#(exam.font_color)" >
                            <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
                            课程: #(exam.course)<br>

                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                            班级:
                                #(exam.classes.delHeadAndTail())
                            <br>

                            <span class=" glyphicon glyphicon-plus" aria-hidden="true"></span>
                            #if (!exam.main_teacher && exam.deputy_teacher)
                                监考教师:
                                    #(exam.deputy_teacher.delHeadAndTail())
                                <br>
                            #else
                                主监考: #(exam.main_teacher)<br>

                                <span class=" glyphicon glyphicon-plus" aria-hidden="true"></span>
                                副监考:
                                    #(exam.deputy_teacher.delHeadAndTail())
                                <br>
                            #end

                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                            教室: #(exam.room) <br>

                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                            考试属性: #(exam.property)
                            <span class="glyphicon glyphicon-minus" aria-hidden="true"></span>
                            <!-- 开闭卷 -->
                            #(exam.type)
                            <br>

                            #if(exam.package_num)
                                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                                试卷袋号:
                                    #(exam.package_num.delHeadAndTail())
                                <br>
                            #end

                            #if(exam.place)
                                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                                备注: #(exam.place)
                            #end
                        </div>

                    </td>
                </tr>
            #end
        </table>
    </div>


#end

#define js()
<script>

    $(document).ready(function () {
        // 获得所有的未考过的集合的第一个
        let needToThrough = $(".exam-blue").first();

        // 找到第一个的顶部位置
        const smallTop = needToThrough.offset().top;
        // 动画跳转
        $("html,body").animate({scrollTop: smallTop - 50}, 1000);

    });

</script>
#end

